<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>点击生成笑脸</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      text-align: center;
      margin: 0;
      padding: 20px;
    }

    .emoji {
      position: absolute;
      font-size: 30px;
    }
  </style>
</head>
<body>
  <button onclick="generateFace()">点击生成笑脸</button>
  <script>
    function generateFace() {
      const smiley = '😊';
      const x = Math.floor(Math.random() * window.innerWidth);
      const y = Math.floor(Math.random() * window.innerHeight);

      const div = document.createElement('div');
      div.classList.add('emoji');
      div.style.left = `${x}px`;
      div.style.top = `${y}px`;
      div.textContent = smiley;
      document.body.appendChild(div);
    }
  </script>
</body>
</html>
